
<?php 

?>
<h1> Suchergebnis</h1><br>

<?php 


foreach ($this->result as $key => $value)
{
	//Serialisierung des mismatchArrays zur Übertragung über die URL
	$ser = serialize($value['mismatchArray']);
	
	echo '<h2><a href="'.$this->url(array('controller'=>'service-provider', 'action' => 'view', 'id' => $value['ServiceProvider_ID'])). '">'.
										  $this->escape($value['ServiceProvider_name'])  .'</a></h2>';				

	foreach ($value['profiles'] as $pkey => $pvalue) {
		$ser = serialize($pvalue['mismatchArray']);
		echo '<h3><a href="'.$this->url(array('controller'=>'profile', 'action'=>'view', 'id' => $pvalue['ServiceProfile_ID'], 'mismatch'=>$ser)).'">'.
		$this->escape($pvalue['ServiceProfile_name']) .'</a></h2>';
		echo '<p><em> Match: '. $this->escape($pvalue['matchProzent']) . '%</em></p>';
		echo '<p><em>'. $this->escape($pvalue['ServiceProfile_description']) .'</em></p>';
	}
	
	
}



?>